package org.tongdao.yulong.value_spel;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.tongdao.yulong.value_spel.bean.Black;
import org.tongdao.yulong.value_spel.bean.Blue;
import org.tongdao.yulong.value_spel.bean.Green;
import org.tongdao.yulong.value_spel.bean.Red;
import org.tongdao.yulong.value_spel.bean.White;

/**
 * @Description: TODO
 * @author: 殷玉龙
 * @date: 2020年09月28日 2:02 下午
 */
public class InjectValueAnnoApplication {
  public static void main(String[] args) {
//    ApplicationContext ctx = new AnnotationConfigApplicationContext(InjectValueConfiguration.class);
    ApplicationContext ctx = new ClassPathXmlApplicationContext("basic_di/inject-green.xml");
    Red bean = ctx.getBean(Red.class);
    Blue blue = ctx.getBean(Blue.class);
    Green green = ctx.getBean(Green.class);
    White white = ctx.getBean(White.class);
    System.out.println(blue);
    System.out.println(green);
    System.out.println(bean);
    System.out.println(white);
  }
}
